    .MODEL SMALL
    .DATA
V DW 000BH  ;11
X DW 0002H  ;2
Y DW 0004H  ;4
Z DW 01A4H  ;420
R1 DW ?
R2 DW ?
MSG DB 'R1,R2 equals:','$'

    .CODE
    .STARTUP
    MOV AX, X
    IMUL Y  ;乘积放DX:AX
    MOV BX, DX
    MOV CX, AX  ;乘积放BX:CX
    MOV AX, Z
    CWD  ;Z扩展后放DX:AX
    ADD CX, AX
    ADC BX, DX  ;XY+Z，放BX:CX
    SUB CX, 420
    SBB BX, 0  ;XY+Z-420，放BX:CX
    MOV AX, V
    CWD  ;V扩展后放DX:AX
    SUB AX, CX
    SBB DX, BX  ;V-(XY+Z-420)
    IDIV X  ;上式/X
    MOV R1, AX
    MOV R2, DX

    LEA DX, MSG
    MOV AH, 09H
    INT 21H

    .EXIT 
    END